<%@ page import="org.apache.ibatis.session.SqlSession" %>
<%@ page import="myschool.mybatisUtil.MybatisUtil" %>
<%@ page import="myschool.dao.SubjectDao" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/6/6
  Time: 19:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    SqlSession s= MybatisUtil.get();
    SubjectDao mapper = s.getMapper(SubjectDao.class);
    String subId = request.getParameter("subjectId");
    mapper.del(Integer.parseInt(subId));
    MybatisUtil.close(s);
    response.sendRedirect("Subject.jsp");
%>
</body>
</html>
